﻿<local:TemplateMarkerGenerator x:Class="DynamicDataDisplay.Markers.CandleStickGenerator"
							   xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
							   xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
							   xmlns:local="clr-namespace:DynamicDataDisplay.Markers"
							   xmlns:d3="http://research.microsoft.com/DynamicDataDisplay/1.0">
	<local:TemplateMarkerGenerator.MarkerTemplate>
		<DataTemplate>
			<local:StockItem Name="stockItem" ToolTipService.ShowDuration="10000"
							 d3:ViewportPanel.ViewportWidth="0.1"
							 d3:ViewportPanel.MinScreenWidth="7"
							 Open="{Binding Open}"
							 Close="{Binding Close}"
							 Low="{Binding Low}"
							 High="{Binding High}"
							 d3:ViewportPanel.Y="{Binding Low}"
							 d3:ViewportPanel.ViewportVerticalAlignment="Bottom"
							 d3:ViewportPanel.X="{Binding Time}">
				<d3:ViewportPanel.ViewportHeight>
					<MultiBinding Converter="{StaticResource heightConverter}">
						<Binding Path="High"/>
						<Binding Path="Low"/>
					</MultiBinding>
				</d3:ViewportPanel.ViewportHeight>
				<local:StockItem.ToolTip>
					<TextBlock>
						<TextBlock Text="High="/><TextBlock Text="{Binding High}"/>
						<LineBreak/>
						<TextBlock Text="Close="/><TextBlock Text="{Binding Close}"/>
						<LineBreak/>
						<TextBlock Text="Open="/><TextBlock Text="{Binding Open}"/>
						<LineBreak/>
						<TextBlock Text="Low="/><TextBlock Text="{Binding Low}"/>
					</TextBlock>
				</local:StockItem.ToolTip>
			</local:StockItem>
		</DataTemplate>
	</local:TemplateMarkerGenerator.MarkerTemplate>
</local:TemplateMarkerGenerator>
